
module.exports = app => {

    return class GrowController extends app.Controller {

        async list() {
            let page = await this.service.grow.list();
            await this.ctx.render('member/grow/index.js', {
                page
            });
        }

        async comment(){

        }

        async api(){
            let page = await this.service.grow.list();
            this.success(page)
        }

        async detail() {
            let id = this.ctx.request.query.id;
            let detail = await this.service.grow.get({
                id
            });

            this.app.logger.info(id);
            await this.ctx.render('member/grow/detail/index.js', {
                detail
            });
        }

        async dynamic() {
            let id = this.ctx.request.query.id;
            let dynamic = await this.service.grow.dynamic({
                id
            });
            this.app.logger.info(id);
            await this.ctx.render('member/dynamic/index.js', {
                dynamic
            });
        }




    };
};
